package API.DAY2.wrapper;

public class IntegerDemo {
    public static void main(String[] args) {
        /*Integer a = new Integer(10);
        Integer b = new Integer(10);
        System.out.println(a == b);
        System.out.println(a.equals(b));
        Integer c = Integer.valueOf(10);
        Integer d = Integer.valueOf(10);
        System.out.println(c == d);
        System.out.println(c.equals(d));
         */
        /*
        Integer a = Integer.valueOf(10);//基本转包装
        int b = a.intValue();//包装转基本
        Integer c = 10;//装箱
        int d = c;//拆箱
         */
        int max = Integer.MAX_VALUE;
        int min = Integer.MIN_VALUE;
        System.out.println("最大："+max+" 最小："+min);
        long max1 = Long.MAX_VALUE;
        long min1 = Long.MIN_VALUE;
        System.out.println("最大："+max1+" 最小："+min1);

        String a = "2002";
        int b = Integer.parseInt(a);
        System.out.println(b);
        String c = "123.123";
        double d = Double.parseDouble(c);
        System.out.println(d);

    }
}
